package com.qixin.part.bean;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;

/**
 * <p>
 * 字典表
 * </p>
 *
 * @author 张子艺
 * @since 2018-08-20
 */
@TableName("pt_dic")
public class PtDic extends Model<PtDic> {

	private static final long serialVersionUID = 1L;
	@TableId(value="id", type= IdType.ID_WORKER )
	private Long id;
	/**
	 * 类型code
	 */
	private String code;
	/**
	 * 类型
	 */
	private String name;
	/**
	 * 父级ID
	 */
	@TableField("parent_id")
	private Long parentId;
	/**
	 * 级别
	 */
	private Integer level;
	/**
	 * 创建时间
	 */
	@TableField("create_time")
	private Long createTime;





	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getParentId() {
		return parentId;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	public Integer getLevel() {
		return level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}

	public Long getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Long createTime) {
		System.err.print(createTime);
		this.createTime = createTime;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "PtDic{" +
				"id=" + id +
				", code=" + code +
				", name=" + name +
				", parentId=" + parentId +
				", level=" + level +
				", createTime=" + createTime +
				"}";
	}
}
